<template>
  <svg-icon @click.native="fullscreen" icon-class="fullscreen" />
</template>

<script>
import screenfull from 'screenfull'
export default {
  methods: {
    fullscreen () {
      // 判断是否支持全屏
      if (screenfull.isEnabled) {
        //  支持全屏
        screenfull.request()
      } else {
        this.$message.warning('当前浏览器不支持全屏')
      }
    }
  }
}
</script>

<style></style>
